home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Collection of Tools & Utilities
/
Collection of Tools and Utilities.iso
/
batchut
/
bcsrce2.zip
/
UTILMEN2.BC
< prev
next >
Wrap
Text File
|
1990-10-16
|
13KB
|
456 lines
bios
ECHO OFF
break on
rem saving starting drive/directory to return to as needed.
GETDRIVE %!d
GETDIR %!p
rem This is not used in this menu. However, if it was:
rem %!d:
rem cd\%!p
rem would be used each time upon changing drives & directories.
Let %!z = L1
:TOP2
rem This is used only when menu has been overwrittened by some other
rem program or full screen write.
cls
GOSUB MENU
:TOP
rem calling the MAKECOM.BAS created screen .COM file.
GOSUB SCREEN
rem ==============================
rem display a clock on screen
HOUR_HOUR
ERROR_LEVEL %!h
let %!w = %!h
lt %!w 10
if errorlevel 1 let %!h = 0%!h
MINUTE_MINUTE
ERROR_LEVEL %!m
let %!w = %!m
lt %!w 10
if errorlevel 1 let %!m = 0%!m
rem the below feature does not give an accurate reading. 'Tis best
rem to not even use it unless attempting a timing algorythm.
REM SECONDS_SECONDS
REM ERROR_LEVEL %!s
rem locate 2 20
rem echonolf ▐ %!h:%!m:%!s ▌
rem *litebar screen writes
locate 2 21
echonolf ▐ %!h:%!m ▌
rem ==============================
rem Get the key press then evaluate it.
rem Note the sequence of using the same ERRLEVEL test two or three times
rem with its associated action command. For two tests, it means HOME,
rem END, or F1-F9 was pressed. For three tests, either an uppercase
rem or lower case letter was pressed. The third test branches to the
rem chosen menu choice's batch commands.
getkey
IF ERRLEVEL 20224 Let %!z = L9
IF ERRLEVEL 20224 GOTO TOP
IF ERRLEVEL 19712 GOTO RTL1
IF ERRLEVEL 19200 GOTO LTL1
IF ERRLEVEL 18176 Let %!z = L1
IF ERRLEVEL 18176 GOTO TOP
IF ERRLEVEL 17408 Let %!z = L1
IF ERRLEVEL 17408 GOTO TOP
IF ERRLEVEL 17152 Let %!z = L9
IF ERRLEVEL 17152 GOTO TOP
IF ERRLEVEL 16896 Let %!z = L8
IF ERRLEVEL 16896 GOTO TOP
IF ERRLEVEL 16640 Let %!z = L7
IF ERRLEVEL 16640 GOTO TOP
IF ERRLEVEL 16384 Let %!z = L6
IF ERRLEVEL 16384 GOTO TOP
IF ERRLEVEL 16128 Let %!z = L5
IF ERRLEVEL 16128 GOTO TOP
IF ERRLEVEL 15872 Let %!z = L4
IF ERRLEVEL 15872 GOTO TOP
IF ERRLEVEL 15616 Let %!z = L3
IF ERRLEVEL 15616 GOTO TOP
IF ERRLEVEL 15360 Let %!z = L2
IF ERRLEVEL 15360 GOTO TOP
IF ERRLEVEL 15104 Let %!z = L1
IF ERRLEVEL 15104 GOTO TOP
IF ERRLEVEL 119 Let %!z = L3
IF ERRLEVEL 119 GOSUB SCREEN
IF ERRLEVEL 119 GOTO L3
IF ERRLEVEL 118 Let %!z = L6
IF ERRLEVEL 118 GOSUB SCREEN
IF ERRLEVEL 118 GOTO L6
IF ERRLEVEL 117 Let %!z = L2
IF ERRLEVEL 117 GOSUB SCREEN
IF ERRLEVEL 117 GOTO L2
IF ERRLEVEL 114 Let %!z = L9
IF ERRLEVEL 114 GOSUB SCREEN
IF ERRLEVEL 114 GOTO L9
IF ERRLEVEL 105 Let %!z = L8
IF ERRLEVEL 105 GOSUB SCREEN
IF ERRLEVEL 105 GOTO L8
IF ERRLEVEL 102 Let %!z = L7
IF ERRLEVEL 102 GOSUB SCREEN
IF ERRLEVEL 102 GOTO L7
IF ERRLEVEL 100 Let %!z = L5
IF ERRLEVEL 100 GOSUB SCREEN
IF ERRLEVEL 100 GOTO L5
IF ERRLEVEL 99 Let %!z = L4
IF ERRLEVEL 99 GOSUB SCREEN
IF ERRLEVEL 99 GOTO L4
IF ERRLEVEL 97 Let %!z = L1
IF ERRLEVEL 97 GOSUB SCREEN
IF ERRLEVEL 97 GOTO L1
IF ERRLEVEL 87 Let %!z = L3
IF ERRLEVEL 87 GOSUB SCREEN
IF ERRLEVEL 87 GOTO L3
IF ERRLEVEL 86 Let %!z = L6
IF ERRLEVEL 86 GOSUB SCREEN
IF ERRLEVEL 86 GOTO L6
IF ERRLEVEL 85 Let %!z = L2
IF ERRLEVEL 85 GOSUB SCREEN
IF ERRLEVEL 85 GOTO L2
IF ERRLEVEL 82 Let %!z = L9
IF ERRLEVEL 82 GOSUB SCREEN
IF ERRLEVEL 82 GOTO L9
IF ERRLEVEL 73 Let %!z = L8
IF ERRLEVEL 73 GOSUB SCREEN
IF ERRLEVEL 73 GOTO L8
IF ERRLEVEL 70 Let %!z = L7
IF ERRLEVEL 70 GOSUB SCREEN
IF ERRLEVEL 70 GOTO L7
IF ERRLEVEL 68 Let %!z = L5
IF ERRLEVEL 68 GOSUB SCREEN
IF ERRLEVEL 68 GOTO L5
IF ERRLEVEL 67 Let %!z = L4
IF ERRLEVEL 67 GOSUB SCREEN
IF ERRLEVEL 67 GOTO L4
IF ERRLEVEL 65 Let %!z = L1
IF ERRLEVEL 65 GOSUB SCREEN
IF ERRLEVEL 65 GOTO L1
IF ERRLEVEL 27 GOTO END
IF ERRLEVEL 13 GOTO SELECT
GOTO TOP
:SCREEN
rem The structure of this section is:
rem 1) Place cursor at each menu choice's title in turn.
rem 2) If this is the one the user pointed to, hilite it.
rem 3) Otherwise, overwrite it with no hilite.
rem 4) Place cursor at position for a title's descriptive text line.
rem 5) If its menu choice title is hilited, then show the descriptive
rem text. If not, do nothing.
rem When recycling this code for a new program, this section takes
rem the most rewriting.
locate 4 2
IF %!z = L1 ECHONOLF ▐ADDRBOOK▌
IF NOT %!z = L1 ECHONOLF ADDRBOOK\\32
locate 6 3
IF %!z = L1 ECHONOLF ADDRess BOOK of Street Talk names (for E-Mail & personal information) ·
locate 4 12
IF %!z = L2 ECHONOLF ▐Users▌
IF NOT %!z = L2 ECHONOLF Users\\32
locate 6 3
IF %!z = L2 ECHONOLF Users currently logged onto the VINES network ·
locate 4 19
IF %!z = L3 ECHONOLF ▐WHOAMI▌
IF NOT %!z = L3 ECHONOLF WHOAMI\\32
locate 6 3
IF %!z = L3 ECHONOLF What is my Street Talk name/What server am I logged onto? ·
locate 4 27
IF %!z = L4 ECHONOLF ▐COPYD▌
IF NOT %!z = L4 ECHONOLF COPYD\\32
locate 6 3
IF %!z = L4 ECHONOLF Copy source filespec to target filespec with safeguard builtin ·
locate 4 34
IF %!z = L5 ECHONOLF ▐DIR_List▌
IF NOT %!z = L5 ECHONOLF DIR_List\\32
locate 6 3
IF %!z = L5 ECHONOLF Input a Filespec to receive information on those files (ex: C:\123\*.WK?) ·
locate 4 44
IF %!z = L6 ECHONOLF ▐ViewASCII▌
IF NOT %!z = L6 ECHONOLF ViewASCII\\32
locate 6 3
IF %!z = L6 ECHONOLF ASCII Chart of Extended IBM characters 128-thru-255 (can be printed) ·
locate 4 55
IF %!z = L7 ECHONOLF ▐Format_A▌
IF NOT %!z = L7 ECHONOLF Format_A\\32
locate 6 3
IF %!z = L7 ECHONOLF Format either a 360K or 1.2MB diskette in drive A: ·
locate 4 65
IF %!z = L8 ECHONOLF ▐Ignor▌
IF NOT %!z = L8 ECHONOLF Ignor\\32
locate 6 3
IF %!z = L8 ECHONOLF Reserved for later expansion as needed ·
locate 4 72
IF %!z = L9 ECHONOLF ▐RunDOS▌
IF NOT %!z = L9 ECHONOLF RunDOS\\32
locate 6 3
IF %!z = L9 ECHONOLF Run a single DOS command without exiting menu program ·
RETURN
:SELECT
rem enter was pressed or one of the first letters of each choice
rem This could be rewrittened as GOTO %!z, but it would be less
rem readable.
IF %!z = L1 GOTO L1
IF %!z = L2 GOTO L2
IF %!z = L3 GOTO L3
IF %!z = L4 GOTO L4
IF %!z = L5 GOTO L5
IF %!z = L6 GOTO L6
IF %!z = L7 GOTO L7
IF %!z = L8 GOTO L8
IF %!z = L9 GOTO L9
GOTO TOP
rem left cursor was pressed, positioning is determined
:LTL1
IF NOT %!z = L1 GOTO LTL2
Let %!z = L9
GOTO TOP
:LTL2
IF NOT %!z = L2 GOTO LTL3
Let %!z = L1
GOTO TOP
:LTL3
IF NOT %!z = L3 GOTO LTL4
Let %!z = L2
GOTO TOP
:LTL4
IF NOT %!z = L4 GOTO LTL5
Let %!z = L3
GOTO TOP
:LTL5
IF NOT %!z = L5 GOTO LTL6
Let %!z = L4
GOTO TOP
:LTL6
IF NOT %!z = L6 GOTO LTL7
Let %!z = L5
GOTO TOP
:LTL7
IF NOT %!z = L7 GOTO LTL8
Let %!z = L6
GOTO TOP
:LTL8
IF NOT %!z = L8 GOTO LTL9
Let %!z = L7
GOTO TOP
:LTL9
IF NOT %!z = L9 GOTO LTL1
Let %!z = L8
GOTO TOP
rem right cursor was pressed, positioning is determined
:RTL1
IF NOT %!z = L1 GOTO RTL2
Let %!z = L2
GOTO TOP
:RTL2
IF NOT %!z = L2 GOTO RTL3
Let %!z = L3
GOTO TOP
:RTL3
IF NOT %!z = L3 GOTO RTL4
Let %!z = L4
GOTO TOP
:RTL4
IF NOT %!z = L4 GOTO RTL5
Let %!z = L5
GOTO TOP
:RTL5
IF NOT %!z = L5 GOTO RTL6
Let %!z = L6
GOTO TOP
:RTL6
IF NOT %!z = L6 GOTO RTL7
Let %!z = L7
GOTO TOP
:RTL7
IF NOT %!z = L7 GOTO RTL8
Let %!z = L8
GOTO TOP
:RTL8
IF NOT %!z = L8 GOTO RTL9
Let %!z = L9
GOTO TOP
:RTL9
IF NOT %!z = L9 GOTO RTL1
Let %!z = L1
GOTO TOP
rem L1-L9 are the commands associated with each menu choice.
rem Suggested continuations are L10-L##. You can choose where to
rem restart the hilited choice from when taken back to the menu
rem by changing the value of %!z variable.
:L1
addrbook
Let %!z = L1
goto TOP2
:L2
cls
echo/
echo/
echo/
users
echo/
echo/
echo.
gosub KLUDGWAT
Let %!z = L2
goto TOP2
:L3
CLS
WHOAMI
ECHO.
ECHO.
WHATZ
echo.
echo.
echo.
gosub KLUDGWAT
Let %!z = L3
goto TOP2
:L4
!COPYD
Let %!z = L4
goto TOP2
:L5
cls
gosub BASICS
rem fits within the info block of BASICS subroutines screen mask.
locate 8 4
echonolf █ Waiting █
locate 9 4
echonolf █ for █
locate 10 4
ec